package cn.tanghom.app.oa.repository;

import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import cn.tanghom.app.oa.model.Candidate;
import cn.tanghom.app.oa.model.Position;
import cn.tanghom.app.oa.model.Talent;

@Repository
public interface CandidateRepository extends JpaRepository<Candidate, Long> {
	
	List<Candidate> findByPositionIdAndTalentId(Long positionId,Long talentId);  
	
	List<Candidate> findByPositionId(Long positionId); 
	
	List<Candidate> findByPositionIdAndStatus(Long positionId,int status); 
	
	List<Candidate> findByTalentId(Long talentId); 
	
	long countByPositionId(Long positionId);  
}